Current Location: Home> Function Categories> dechex

dechex

Convert decimal to hexadecimal
Name:dechex
Category:math
Programming Language:php
One-line Description:Convert decimal to hexadecimal.

Definition and usage

dechex() function converts decimal to hexadecimal.

Example

 <?php
echo dechex ( "30" ) ;
echo dechex ( "10" ) ;
echo dechex ( "1587" ) ;
echo dechex ( "70" ) ;
?>

Try it yourself

grammar

 dechex ( dec_number )
parameter describe
dec_number Required. Specifies the decimal number to be converted.

illustrate

Returns a string containing the hexadecimal representation of the given binary_string parameter. The maximum value that can be converted is 4294967295 in decimal, and the result is "ffffffff".

Similar Functions
Popular Articles